import cv
import os
from opencv.highgui import cvLoadImage

def resize(imgPath, newWidth, newHeight):
    image = cv.LoadImageM(imgPath)
    thumbnail = cv.CreateMat(image.rows / 10, image.cols / 10, image.type)
    cv.Resize(image, thumbnail)
    cv.SaveImage("Resized", thumbnail)
    
    
imgPath="/home/loai/Desktop/loai_reco.jpg"
resize(imgPath,0,0)
